﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SAPBorrowEdit.aspx.cs" Inherits="IHISCETeim.Web.MachineSys.SAPModel.SAPBorrowEdit" %>

<div class="pageContent">
	
		<div class="pageFormContent" layoutH="56">
                <h2 style=" padding:0px 0px 5px 6px; border-bottom:1px solid #B8D0D6;">1.基本信息</h2>
                 <p>
				      <label>借件单号：</label>
				      <input name="DocNum" type="text" class="" readonly value="<%=obj.DocNum %>" />
			     </p>
                 <p>
				      <label>借件日期：</label>
				      <input name="TaxDate" type="text" class="" readonly value="<%=obj.TaxDate %>" />
			     </p>
                 <div class="divider"></div>
                <p>
				      <label>借件部门：</label>
				      <input name="JieJianBuMen" type="text" class="" readonly value="<%=obj.JieJianBuMen %>" />
			     </p>
                <p>
				      <label>预计归还时间：</label>
				      <input name="YJGuHuanShiJian" type="text" class="" readonly value="<%=obj.YJGuHuanShiJian %>" />
			     </p>
                 <p>
				      <label>物料号：</label>
				      <input name="ItemCode" type="text" class="" readonly value="<%=obj.ItemCode %>" />
			     </p>
                 <p>
				      <label>物料名称：</label>
				      <input name="Dscription" type="text" class="" readonly value="<%=obj.Dscription %>" />
			     </p>
                 <div class="divider"></div>
                <p>
				      <label>数量：</label>
				      <input name="Quantity" type="text" class="" readonly value="<%=obj.Quantity %>" />
			     </p>
                 <p>
				      <label>日记帐备注：</label>
				      <input name="JrnlMemo" type="text" class="" readonly value="<%=obj.JrnlMemo %>" />
			     </p>
                 <div class="divider"></div>
                <h2 style=" padding:0px 0px 5px 6px; border-bottom:1px solid #B8D0D6;">2.归还记录</h2>
                <div id="sapdfctprdfctry_add">
                    <form method="post" action="SAPModel/SAPBorrowEdit.aspx?action=<%=action %>&BrwID=<%=BrwID %>" class="pageForm required-validate" onsubmit="return validateCallback(this, navTabAjaxDone);" >
                        <p>
				          <label>数量：</label>
				          <input name="Quantity" type="text" class="required" max="<%=obj.Quantity-obj.ReturnQuantity %>" min="1"  value="<%=obj.Quantity-obj.ReturnQuantity %>" />
			            </p>
                        <p>
				          <label>归还日期：</label>
				          <input name="GuHuanShiJian" type="text" class="date"  value="<%=DateTime.Now.ToString("yyyy-MM-dd") %>" />
			            </p>
                         <div class="divider"></div>
                        <p>
				          <label>处理人：</label>
				          <input name="RealName" type="text" class=""  value="<%=base.User.RealName %>" />
			            </p>
                        <p>
				          <label>说明：</label>
				          <input name="Remark" type="text" class=""  value="" />
			            </p>
                         <div class="divider"></div>
                        <p>
				          <label>&nbsp;</label>
                            <input type="hidden"  name="ajaxmethod" value="add" />
                             <%if (HasPower(IHISCETeim.Web.Permission.修改))
                                 {%> 
				            <button type="submit" onclick="return SAPDfctPrdFctryEditAdd()" > 添加 </button>
                            <%} %>
			            </p>
                        
                    </form>
                </div>
                <table class="list"  style="width:100%" >
                       <thead>
                         <tr>                                    
                                    <th width="150px">归还日期</th>
                                    <th>数量</th>
                                    <th>经办人</th>
                                    <th>说明</th>
                          </tr>                                
                        </thead>
                        <tbody>
                        <asp:repeater id="rpParts" runat="server">                    
                            <ItemTemplate>
                            <tr>   
                                <td><%# Eval("GuHuanShiJian") %></td>
                                <td><%# Eval("Quantity") %></td>
                                <td><%# Eval("RealName") %></td>
                                <td><%# Eval("Remark") %></td>
                            </tr>
                            </ItemTemplate>                           
                        </asp:repeater>
                        </tbody>
                 </table>  
        </div>
    </form>
 </div>

<script type="text/javascript">

    function SAPDfctPrdFctryEditAdd()
    {
        if(confirm("你确认要添加此归还记录吗?")){
           
            return true;
        }
        else
            return false;
    }
</script>